<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../styleadmin.css" type="text/css" />

<script language="javascript">
    function checkadd()
    {
        if(document.frmcategoryadd.CateName.value=="")
        {
            document.getElementById('err1').innerHTML="Nhập tên nhóm sản phẩm!";
            document.frmcategoryadd.CateName.focus();
            return false;
        }
        else return true;
    }
</script>

</head>
<body>


<p>&nbsp;</p>
<form action="admin.php?go=category_add&action=add" method="post" id="frmcategoryadd" name="frmcategoryadd">
    <table width="100%" border="0" align="center" cellpadding="7" cellspacing="5">
        <tr>
            <td colspan="3" align="center"><p class="style1"><h2> <b> INSERT CATEGORY </b></h2> </p>
                <p>&nbsp;</p></td>
        </tr>
        <tr>
            <td width="26%" bgcolor="#FFCC00" align="right"><span class="style3">Category_Name: </span></td>
            <td width="74%"><input class="tableboxinput" name="CateName" type="text" id="CateName" size="50" onFocus="style.backgroundColor='#F0F0F0'" onBlur="style.backgroundColor='white'" /></td>
        </tr>
        <tr>
            <td width="26%" bgcolor="#FF6633" align="right">Category_Description:</td>
            <td width="74%"><input class="tableboxinput" name="CateName" type="text" id="CateName" size="50" onFocus="style.backgroundColor='#F0F0F0'" onBlur="style.backgroundColor='white'" /></td>
        </tr>
        <tr>
            <td width="26%" bgcolor="#FF0033" align="right"><span class="style3">Status: </span></td>
            <td colspan="2"><select class="tableboxinput" name="CateStatus" id="CateStatus" >
                    <option value="1" selected>Hiển thị</option>
                    <option value="0">Ẩn</option>
                </select>	  </td>
        </tr>
        <tr>
            <td width="26%" bgcolor="#FF0033" align="right"><span class="style3">Status: </span></td>
            <td colspan="2"><select class="tableboxinput" name="CateStatus" id="CateStatus" >
                    <?php if($listcate != NULL){ ?>
                    <?php $i=1; foreach($listcate as $data){ ?>
                        <option value="<?php echo $data['cate_id']; ?>"><?php echo $data['cate_name']; ?></option>
                    <?php } } ?>
                </select></td>
        </tr>
        <tr>
            <td width="26%"></td>
            <td width="74%"><input class="buttonbutton" type="submit" name="Submit" value="Insert" onClick="return checkadd();" />
                <input name="button" type="button" class="buttonbutton" onclick="window.location='admin.php?go=category_list'" value="Back to list" /></td>
        </tr>
    </table>
</form>

</body>
</html>